import axios from "axios";

const http = axios.create({
    baseURL: "xxxx", // 设置基础路径
    timeout: xxxx // 超时
});

// 请求拦截器
http.interceptors.request.use((config) => {
    config.headers = {
        "Content-Type": "application/json"
    }
    console.log(config);
    return config;
})
// 响应拦截器
http.interceptors.response.use(msg => {
    return msg;
});

export default http
